﻿using iTool.ClusterComponent;
using System.Threading.Tasks;

namespace Grain.Interfaces
{
    public interface INotifyService : iToolServiceWithStringKey
    {
        Task Publish(string message, string sendOfChannel);
        /// <summary>
        /// 推送静默消息
        /// [多用于推送即时状态通知等,无需用户感知]
        /// </summary>
        /// <returns></returns>
        Task PublishSilence(string sendOfChannel, string message);
        Task Subscribe(string channel);
        Task UnSubscribe(string channel);
        Task Clear();
    }
}
